import Vue from 'vue'
import VueRouter from 'vue-router'
import backIndex from '../components/backIndex'
import empSalary from '../components/empSalary'
import attendanceTemp from '../components/attendanceTemp'
import attendanceItem from '../components/attendanceItem'
import attenanceDic from '../components/attenanceDic'
import attendanceEmp from '../components/attendanceEmp'
import attendanceCommitAll from '../components/attendanceCommitAll'
import phoneIndex from '../components/phoneIndex.vue'
import attendanceReport from '../components/attendanceReport'
import attendanceCommitList from '../components/attendanceCommitList'
import attendanceTempInfo from '../components/attendanceTempInfo'
import attendanceReportBack from '../components/attendanceReportBack'
import attendanceEmpSelf from '../components/attendanceEmpSelf'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/phoneIndex' },
  {
    path: '/backIndex', component: backIndex,
    path: '/backIndex', redirect: '/attendanceEmpSelf',
    children:
      [
        { path: '/empSalary', component: empSalary },
        { path: '/attendanceTemplate', component: attendanceTemp },
        { path: '/attendanceItem', component: attendanceItem },
        { path: '/attenanceDic', component: attenanceDic },
        { path: '/attendanceReportBack', component: attendanceReportBack },
        { path: '/attendanceEmp', component: attendanceEmp },
        { path: '/attendanceCommitAll', name: 'attendanceCommitAll', component: attendanceCommitAll },
        { name: 'attendanceCommitList', path: '/attendanceCommitList', component: attendanceCommitList },
        { path: '/attendanceTempInfo', component: attendanceTempInfo },
        { path: '/attendanceEmpSelf', component: attendanceEmpSelf },
      ]
  },
  { path: '/phoneIndex', component: phoneIndex },

  { path: '/attendanceReport', component: attendanceReport },


]

const router = new VueRouter({
  routes
})

export default router
